package com.leantech.android.browser.ui.shortcut

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

class ShortCutPagerAdapter(activity: FragmentActivity) : FragmentStateAdapter(activity) {

    override fun getItemCount(): Int {
        return 3
    }

    override fun createFragment(position: Int): Fragment {
        return when (position) {
            0 -> LinkShortCutFragment()
            1 -> FavoritesShortCutFragment()
            2 -> HistoryShortCutFragment()
            else -> throw UnsupportedOperationException("")
        }
    }
}